﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebCore.Models
{
    public class DataContext: DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
            => optionsBuilder.UseMySQL(@"Server=localhost;database=netcore_db;uid=root;pwd=123456");

        public DbSet<emp> emp { set; get; }
        public DbSet<menu> menu { set; get; }
        public DbSet<order> order { set; get; }
        public DbSet<product> product { set; get; }
        public DbSet<role> role { set; get; }
        public DbSet<role_menu> role_menu { set; get; }
    }
}
